package com.itlong.cloud.property.dao;

import com.itlong.cloud.POJO.PO.DeviceCloudIntercomAuthPO;
import com.itlong.cloud.POJO.VO.property.EquipAuthUserGetVO;
import com.itlong.cloud.abstracts.IAbstractBaseDao;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <desc>
 *      物业系统用户云对讲设备权限数据访问接口
 * </desc>
 *
 * @createDate 2017-11-02
 */
@Mapper
@Repository
public interface IPropertyDeviceAuthCloudIntercomAuthDao extends IAbstractBaseDao<DeviceCloudIntercomAuthPO> {
    /**
     * <desc>
     *      获取用户云对讲设备权限
     * </desc>
     * @param params
     * @return List<DeviceCloudIntercomAuthPO> 用户门禁权限实体对象集
     * @author zhangs
     * @createDate 2017/10/11
     */
    List<DeviceCloudIntercomAuthPO> getUserDeviceCloudIntercomAuth(Map<String, Object> params);

    /**
     * <desc>
     *      更新用户云对讲设备权限
     * </desc>
     * @param deviceCloudIntercomAuthPO
     * @return
     * @author zhangs
     * @createDate 2017/10/11
     */
    Integer update(DeviceCloudIntercomAuthPO deviceCloudIntercomAuthPO);

    /**
     * <desc>
     *      更新用户云对讲设备权限
     * </desc>
     * @param deviceCloudIntercomAuthPO
     * @return
     * @author zhangs
     * @createDate 2017/10/11
     */
    Integer updateById(DeviceCloudIntercomAuthPO deviceCloudIntercomAuthPO);

    /**
     * <desc>
     *      保存用户云对讲设备权限
     * </desc>
     * @param params
     * @return
     * @author zhangs
     * @createDate 2017/10/11
     */
    Integer save(Map<String, Object> params);

    /**
     * <desc>
     *      删除用户电梯设备权限
     * </desc>
     * @param id 删掉的数据的Id
     * @return
     * @author zhangs
     * @createDate 2017/10/11
     */
    Integer deleteById(String id);

    /**
     * <desc>
     *      根据条件删除用户设备权限信息
     * </desc>
     * @param param 条件
     * @return
     * @author zhangs
     * @createDate 2017/12/5
     */
    Integer delByParam(Map<String, Object> param);

    /**
     * <desc>
     *      批量保存用户云对讲设备权限
     * </desc>
     * @param cloudIntercomAuthBatchParams
     * @return
     * @author zhangs
     * @createDate 2018/02/28
     */
    Integer batchSave(List<Map<String, Object>> cloudIntercomAuthBatchParams);

    /**
     * <desc>
     *      根据设备唯一码获取有设备权限的一卡通用户
     * <desc/>
     * @param  param
     * @return
     * @author Juguang.S
     * @createDate 2018/4/17
     */
    List<EquipAuthUserGetVO> getSmartCardUser(Map<String,Object> param);
}
